package io.renren.modules.app.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import io.renren.modules.app.entity.OrderEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Auther zxl
 * @Date 2018/12/15 19:50
 * @Description
 **/
@Mapper
public interface OrderDao extends BaseMapper<OrderEntity> {

//    List<OrderEntity> selectUserNotCloseOrders(@Param("userId") Long userId);

    Integer updateAssess(OrderEntity orderEntity);

    Integer updateReceiver(OrderEntity orderEntity);

    Integer updateOrderState(@Param("orderId") String orderId,@Param("state") Integer state);

    /**
     * 拒单
     * @param orderId
     * @param reason
     * @return
     */
    Integer rejectOrder(@Param("orderId") String orderId,@Param("reason") String reason);

    /**
     * 完成订单
     * @param orderId
     * @return
     */
    Integer successOrder(@Param("orderId") String orderId);
}
